package com.dragon.mmochat.model.scheduleJob.pkGame;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;

import com.dragon.mmochat.model.scheduleJob.pkGame.activities.MmochatGangMixedPkGame;
import com.dragon.mmochat.model.scheduleJob.pkGame.activities.MmochatNo1PkGame;
import com.dragon.mmochat.model.scheduleJob.pkGame.activities.MmochatPersonalPkGame;
import com.dragon.mmochat.model.scheduleJob.pkGame.activities.MmochatWuDaoPkGame;

//19:40开启活动地图
public class PreparePkGame implements Job {

	@SuppressWarnings("deprecation")
	@Override
	public void execute(JobExecutionContext context) {
		try {
			Date now = new Date();
			switch (now.getDay()) {
			case 0:
			case 3: {
				// 个人争霸赛
				MmochatPersonalPkGame game = new MmochatPersonalPkGame();
				game.prepare();
				break;
			}
			case 2:
			case 5: {
				// 帮派大乱斗
				MmochatGangMixedPkGame game = new MmochatGangMixedPkGame();
				game.prepare();
				break;
			}
			case 1: {
				// 武道会
				MmochatWuDaoPkGame game = new MmochatWuDaoPkGame();
				game.prepare();
				break;
			}
			case 6: {
				// 天下第一争霸赛
				MmochatNo1PkGame game = new MmochatNo1PkGame();
				game.prepare();
				break;
			}
			default:
				break;
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
